import request from '@/utils/request'

// 查询付款流程列表
export function listFinancePayment(query) {
  return request({
    url: '/oa/financePayment/list',
    method: 'get',
    params: query
  })
}

// 查询付款流程详细
export function getFinancePayment(id) {
  return request({
    url: '/oa/financePayment/' + id,
    method: 'get'
  })
}

// 新增付款流程
export function addFinancePayment(data) {
  return request({
    url: '/oa/financePayment',
    method: 'post',
    data: data
  })
}

// 修改付款流程
export function updateFinancePayment(data) {
  return request({
    url: '/oa/financePayment',
    method: 'put',
    data: data
  })
}

// 删除付款流程
export function delFinancePayment(id) {
  return request({
    url: '/oa/financePayment/' + id,
    method: 'delete'
  })
}

// 获取没有采购流程的项目信息
export function getProjectList() {
    return request({
        url: '/oa/financePayment/getProjectList',
        method: 'get'
    })
}

export function queryFinancePaymentByProjectName(data) {
  return request({
    url: '/oa/financePayment/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
